package com.baomidou.wechat.vo.api;

import com.baomidou.wechat.vo.ApiResult;

/**
 * 微信API凭证
 */
public class AccessToken extends ApiResult {
	/**
	 * 获取到的凭证
	 */
	private String access_token;
	/**
	 * 凭证有效时间,单位:秒
	 */
	private long expires_in;

	public String getAccess_token() {
		return access_token;
	}

	public void setAccess_token(String access_token) {
		this.access_token = access_token;
	}

	public long getExpires_in() {
		return expires_in;
	}

	public void setExpires_in(long expires_in) {
		this.expires_in = (expires_in - 30) * 1000;
	}

	@Override
	public String toString() {
		return "AccessToken [access_token=" + access_token + ", expires_in=" + expires_in + "]";
	}
}
